#include <cstdlib>
#include <stdio.h>
#include <iostream>la
#include<queue>
using namespace std;

template<typename T>
void data_swap(T & a,T &b)
{
	T c=a;
	a=b;
	b=c;
}

int main()
{
	int a=1,b=2;
	double c=2,d=4;
	data_swap(a,b);
	data_swap(c,d);
	cout << a<<" " <<b << "\n";
	cout << c<<" " <<d << "\n";
	return 0;
}
